TARGETS = objtest classs_destruct class_using alloc_free

all: $(TARGETS) 

#CPPFLAGS = -std=c++11 -g -O2
CPPFLAGS = -std=c++11 -g
LIBS = 

%.o : %.cpp
	g++ $(CPPFLAGS) -c $< -o $@


objtest: class_main.o shape_circle.o class_base.o class_derived.o
	g++ $^ -o objtest $(LIBS)

classs_destruct: classs_destruct.o
	g++ $^ -o classs_destruct

class_using: class_using.o
	g++ $^ -o class_using
alloc_free: alloc_free.o
	g++ $^ -o alloc_free
	
.PHONY: clean
clean:
	rm -rf $(TARGETS) *.o